<!--<html lang="en">-->
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<!--    <head th:insert="~{import :: head}"></head>-->
    <link rel="stylesheet" href="css/bootstrap.min.css"/>
    <script src="js/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <meta charset="UTF-8">
    <title>OA</title>
    <script type="text/javascript">
        function clickLogin() {
            const username = $("#name").val().trim();
            const password = $("#pwd").val().trim();
            if (username.length===0 || password.length===0) {
                alert("请输入用户名和密码！");
                return
            }
            $("#loginForm").submit();
        }
    </script>
    <style type="text/css">
        .content{
            width: 100%;
            height: 100%;
            position: fixed;
            background: #EFF4F7;
            text-align: center;
        }

        .bs {
            width: 50%;
            margin: 180px auto;
            min-width: 416px;
        }

        .tb {
            width: 400px;
            background: #FFFFFF;
            margin: 40px auto;
            border-radius: 5px;
            padding: 0 0 20px 0;
        }

        .lb{
            color: #8896A8;
        }

        .btn-login {
            color: #fff;
            background-color: #309EF1;
            border-color: #2e6da4
        }

        .form-group {
            padding: 0 15px;
        }
    </style>
</head>
<body>
<div class="content">
    <div class="bs">
        <h1>OA 后台管理系统</h1>
        <div class="tb">
            <form id="loginForm" name="loginForm" th:action="@{/sys/toLogin}" method="post">
                <!-- Username -->
                <div class="form-group" align="left">
                    <br><br>
                    <label class="lb" for="name">用户名</label>
                    <input type="text" class="form-control" id="name" name="username">
                </div>

                <!-- Password -->
                <div class="form-group" align="left">
                    <label class="lb" for="name" >密码</label>
                    <input id="pwd" type="password" class="form-control" name="password">
                </div>

                <div class="form-group" align="left">
                    <button type="button" class="btn btn-login btn-sm" onclick="clickLogin()"
                            style="width: 100%; height: 35px;"> 登录 </button>
                </div>
            </form>
        </div>
    </div>
</div>

<script th:src="@{/js/custom.js}"></script>
</body>
</html>